<template>
  <page-header-wrapper :title="false">
    <a-card title="财务工作台">
      <a-row :gutter="30">
        <a-col :span="4">
          <a-card hoverable :loading="loading" @click="$router.push({ name: 'CheckContract', params: { tab: '1' } })">
            <a-statistic
              title="待审合同"
              :value="indexData.pendingContractCount"
              :value-style="{ color: '#cf1322' }"
            >
            </a-statistic>
          </a-card>
        </a-col>
<!--        <a-col :span="4">-->
<!--          <a-card hoverable :loading="loading" @click="$router.push({ name: 'CheckContract' })">-->
<!--            <a-statistic-->
<!--              title="审核不过合同"-->
<!--              :value="indexData.notPassContractCount"-->
<!--              :value-style="{ color: '#3f8600' }"-->
<!--            >-->
<!--            </a-statistic>-->
<!--          </a-card>-->
<!--        </a-col>-->
        <a-col :span="4">
          <a-card hoverable :loading="loading" @click="$router.push({ name: 'CheckInvoiceList' })">
            <a-statistic
              title="未审发票"
              :value="indexData.pendingInvoiceCount"
              :value-style="{ color: '#cf1322' }"
            >
            </a-statistic>
          </a-card>
        </a-col>
        <a-col :span="4">
          <a-card hoverable :loading="loading">
            <a-statistic
              title="退款管理"
              value="*"
              :value-style="{ color: '#cf1322' }"
            >
            </a-statistic>
          </a-card>
        </a-col>
        <a-col :span="4">
          <a-card hoverable :loading="loading">
            <a-statistic
              title="报销审批"
              value="*"
              :value-style="{ color: '#cf1322' }"
            >
            </a-statistic>
          </a-card>
        </a-col>
        <a-col :span="4">
          <a-card hoverable :loading="loading">
            <a-statistic
              title="业务结算"
              value="*"
              :value-style="{ color: '#cf1322' }"
            >
            </a-statistic>
          </a-card>
        </a-col>
        <a-col :span="4">
          <a-card hoverable :loading="loading">
            <a-statistic
              title="非常规业务"
              value="*"
              :value-style="{ color: '#cf1322' }"
            >
            </a-statistic>
          </a-card>
        </a-col>
      </a-row>
    </a-card>
  </page-header-wrapper>
</template>

<script>
import { getData } from '@/api/dashboard'

export default {
  name: 'Workplace',
  data () {
    return {
      indexData: {},
      loading: true
    }
  },
  created () {
    this.getWork()
  },
  methods: {
    getWork () {
      this.loading = true
      getData().then(res => {
        this.indexData = res.result
        this.loading = false
      })
    }
  }
}
</script>

<style scoped>

</style>
